Add async StudioMember binding protocol#548
Conversation
|
Updated this PR with the scoped fixes we discussed. What changed in the latest push (
Smoke test against local Validation run:
I also created follow-up #616 for replacing the legacy |
|
Small follow-up after review: I removed Reason: the successful platform binding continuation is dispatched with a direct route from I kept the existing failure self-handling check because failure can still be produced internally by the run actor when the platform binding port is unavailable. Validation after removing it:
|
Summary
Implements the StudioMember async binding protocol from issue #516.
StartAsync; the run actor now drives platform binding through self continuation and can recover pending runs from persisted state.ExecuteAsyncnow returns after starting the platform work, and completion/failure flows back through typed continuation events.Scope Notes
This PR intentionally keeps the fix scoped to StudioMember async binding correctness. It does not actorize or redesign the broader legacy ScopeBinding command service.
Adjacent architecture issues are tracked separately in #543-#547 and are not prerequisites for this async binding protocol unless a later change explicitly wires them into this flow.
Follow-up #616 tracks replacing
ScopeBindingCommandApplicationServicereadmodel visibility polling with an explicit readiness/observation contract. That cleanup is derivative architecture debt; PR #548 is functional without expanding into it.Failure codes remain open strings for now because current control flow branches on typed run status, while failure code is only diagnostic/display data. If retry/API behavior starts branching by reason, we should promote the reason to a typed enum plus detail fields.
Smoke Test
Ran
Aevatar.Mainnet.Host.Apilocally onhttp://127.0.0.1:5101with auth disabled and in-memory runtime/projection providers.GET /api/healthreturned200ready.POST /api/scopes/{scopeId}/membersreturned201.PUT /api/scopes/{scopeId}/members/{memberId}/bindingreturned accepted with binding runbind-d0f71c089c944c88be8276e65050f300.GET /api/scopes/{scopeId}/members/{memberId}/binding-runs/{bindingRunId}reachedstatus: "succeeded".GET /api/scopes/{scopeId}/members/{memberId}/bindingreturnedlastBinding.revisionId: "rev-smoke-gagent-1".GET /api/scopes/{scopeId}/members/{memberId}/endpoints/chat/contractreturned200.Validation
dotnet build src/Aevatar.Mainnet.Host.Api/Aevatar.Mainnet.Host.Api.csproj --nologo— passed with existing warnings.dotnet test test/Aevatar.Studio.Tests/Aevatar.Studio.Tests.csproj --no-restore --nologo --filter "ScopeBindingStudioMemberPlatformBindingCommandServiceTests|ActorDispatchStudioMemberCommandServiceTests|StudioMemberBindingRunGAgentStateTests|StudioMemberServiceBindingTests"— 37 passed.dotnet test test/Aevatar.Studio.Tests/Aevatar.Studio.Tests.csproj --no-restore --nologo— 473 passed.bash tools/ci/test_stability_guards.sh— passed.bash tools/ci/architecture_guards.sh— passed.Related